class Student:
    def __init__(self, name, student_id):
        self.name = name
        self.student_id = student_id
        self.greed = {"语文": 0, "数学": 0, "英语": 0}

    def set_grade(self, course, grade):
        if course in self.greed:
            self.greed[course] = grade

    def print_grade(self):
        print(f"学生{self.name}(学号:self.student_id)的成绩为:")
        for course in self.greed:
            print(f"{course}: {self.greed[course]}")


xu = Student("小徐", 10023)
xu.set_grade("数学", 98)
xu.set_grade("语文", 95)
xu.print_grade()
# zhao = Student("小赵", 10025)
# print(xu.name)
# print(xu.greed)

